package com.spring.demo.core.service.impl;

import com.spring.demo.core.service.ISimpleService;

public class SimpleService implements ISimpleService {

	private String name;

	private int id;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Override
	public void printNameId() {
		System.out.println("SimpleService : Method printNameId() : My name is "
				+ name + " and my id is " + id);
	}

	@Override
	public void checkName() {
		if (name.length() < 20) {
			throw new IllegalArgumentException();
		}
	}

	@Override
	public void sayHello(String message) {
		System.out.println("SimpleService : Method sayHello() : Hello! "
				+ message);
	}
}
